package de.tudarmstadt.fgbs.cafe.plugin.management;

import de.tudarmstadt.fgbs.cafe.exception.FlawedConfigurationException;

/**
 * Interface for classes providing the functionalities needed by a plugin
 * manager to perform it's work.
 * 
 * @author Christian Schlehuber
 */
public interface PluginManagerCoreInterface {
    /**
     * Register the plugin with the given name
     * 
     * @param name
     *            The plugin's names
     * 
     * 
     * @return The pluginId that was assigned to the plugin.
     * @throws FlawedConfigurationException
     *             If the configuration is faulty and no instance of a class
     *             implementing the can be created.
     */
    public int registerPlugin(String name) throws FlawedConfigurationException;

    /**
     * Determines whether a plugin with the given name is installed.
     * 
     * @param name
     *            The plugin's name.
     * 
     * @return The pluginID which has assigned by the install of the plugin
     * @throws FlawedConfigurationException
     *             If the configuration is faulty and no instance of a class
     *             implementing the can be created.
     */
    public Integer existsPlugin(String name)
	    throws FlawedConfigurationException;
}
